//
//  RoutePlanningTravelTopView.m
//  didacar
//
//  Created by imac on 15/12/20.
//  Copyright © 2015年 dzmmac. All rights reserved.
//

#import "RoutePlanningTravelTopView.h"
#import "UILabel+Yyx.h"
#import "UIScreen+Frame.h"
#import "UIButton+Dzm.h"
@implementation RoutePlanningTravelTopView


-(void)awakeFromNib{
    self.line1_layout_height.constant = 0.45;
    self.line_layout_height.constant = 0.45;
    [self.showTicket styleButton];
}

+(RoutePlanningTravelTopView *)getRoutePlanningTravelTopView{
    RoutePlanningTravelTopView *routePlanningWaiteTopView = (RoutePlanningTravelTopView *)[[[NSBundle mainBundle]  loadNibNamed:@"RoutePlanningTravelTopView" owner:self options:nil] lastObject];
    routePlanningWaiteTopView.frame = CGRectMake(0, 0, [UIScreen width], 200);
    [routePlanningWaiteTopView addSubview:[CommoneTools createLineWithFrame:CGRectMake(10, 85, [UIScreen width] - 20, 0.45)]];
    routePlanningWaiteTopView.backgroundColor = [UIColor redColor];
    return routePlanningWaiteTopView;
}

- (IBAction)showTicketAction:(UIButton *)sender {
    [self.delegate showTicketAction];
}

-(void)showHeaderData:(ResponseLineDetailModel *)responseLineDetailModel{
    
    self.startTime.text     = responseLineDetailModel.SendTime;
    self.startLocation.text = responseLineDetailModel.StartStation;
    self.endLocation.text   = responseLineDetailModel.EndStation;
    
    self.statusLabel.text = @"970SG";
    self.kilometerTime.text = [NSString stringWithFormat:@"%@公里，约%@",responseLineDetailModel.Mileage.stringValue,responseLineDetailModel.UserTime];
}



#pragma mark ------------保险-----------------
- (IBAction)secureAction:(UIButton *)sender {
    
    [self.delegate secureAction];
}

#pragma mark ------------迟到-----------------
- (IBAction)belateBtnAction:(UIButton *)sender {
    [self.delegate belateBtnAction];
}

@end
